#ifndef LOADDB_H
#define LOADDB_H

#include <QWidget>
#include <QFileDialog>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSet>
#include "SystemVal.h"

namespace Ui {
class LoadDB;
}

class LoadDB : public QWidget
{
    Q_OBJECT

public:
    explicit LoadDB(QWidget *parent = nullptr);
    ~LoadDB();

    // arg1: 多张表   arg2:主字段
    PAR_VAL parseOri(QStringList insList,QString zd = "SEAMID");

    void convert(PAR_VAL &,DBValue &,QString type = "SEAMINFO");
signals:
    void openMain();

private slots:
    void on_pb_Next_clicked();

    void on_pb_openTarget_clicked();

    void on_pb_openOri_clicked();

private:
    Ui::LoadDB *ui;
    QSqlDatabase dbT1;

    bool equal = false;

    QString last_ori;
    QString last_tar;

    bool ori_OK = false;
    bool tar_OK = false;
};

#endif // LOADDB_H
